package demo2;

public class Bird extends Animal{
    public String color;
    public String gender;

    public Bird(int age, String name, String gender,String color) {
        super(age, name, gender);
        this.color = color;
        System.out.println("调用Bird含参构造方法！");
    }

    {
        this.age = 0;
        this.gender = "雌";
        this.name = "_";
        System.out.println("调用Bird实例化代码块！");
    }

    static {
        home = "我家";
        System.out.println("调用Bird静态代码块！");
    }

    public Bird() {
        super();
        System.out.println("调用Bird无参构造方法！");
    }

    public void func() {
        super.gender = "雌雄";
        //super.func();
        System.out.println(this.name+"可以飞！");
    }
    {
        func();
        super.func();
    }

}
